<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>TP1-Algo:  Fichier source de Porte.cpp</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">TP1-Algo
   &#160;<span id="projectnumber">1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Généré par Doxygen 1.8.6 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Page&#160;principale</span></a></li>
      <li><a href="namespaces.html"><span>Espaces&#160;de&#160;nommage</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Fichiers</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>Liste&#160;des&#160;fichiers</span></a></li>
      <li><a href="globals.html"><span>Membres&#160;de&#160;fichier</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('_porte_8cpp_source.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">Porte.cpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_porte_8cpp.html">Aller à la documentation de ce fichier.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_porte_8h.html">Porte.h</a>&quot;</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;</div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="keyword">namespace </span>TP1</div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;{</div>
<div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="class_t_p1_1_1_porte.html#a0bdab560d2ef222d1269fa11dd579d51">   20</a></span>&#160;    <a class="code" href="class_t_p1_1_1_porte.html#aaa1c4811df774b15a10037b57872523c">Porte::Porte</a>(<a class="code" href="namespace_t_p1.html#a8b5ef3e0301394a6503b5b11ab59690e">Couleur</a> c, <a class="code" href="class_t_p1_1_1_piece.html">Piece</a>* d)</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;    :color(c), destination(d)</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;    {}</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;</div>
<div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="class_t_p1_1_1_porte.html#aaa1c4811df774b15a10037b57872523c">   27</a></span>&#160;    <a class="code" href="class_t_p1_1_1_porte.html#aaa1c4811df774b15a10037b57872523c">Porte::Porte</a>()</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;    :color(<a class="code" href="namespace_t_p1.html#a8b5ef3e0301394a6503b5b11ab59690eae0bf5933ca3585058577def6ab4ceec7">Aucun</a>), destination(0)</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;    {}</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div>
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="class_t_p1_1_1_porte.html#a9a13199023bb030e7939966f3d4fb6cc">   34</a></span>&#160;    <a class="code" href="class_t_p1_1_1_porte.html#a9a13199023bb030e7939966f3d4fb6cc">Porte::~Porte</a>()</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    {</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;        <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;    }</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;</div>
<div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="class_t_p1_1_1_porte.html#a6c979f13c8890e0182cde0e136c2b8db">   44</a></span>&#160;    <a class="code" href="class_t_p1_1_1_porte.html#aaa1c4811df774b15a10037b57872523c">Porte::Porte</a>(<span class="keyword">const</span> <a class="code" href="class_t_p1_1_1_porte.html">Porte</a>&amp; p)</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;    :color(p.color), destination(p.destination)</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    {}</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;</div>
<div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="class_t_p1_1_1_porte.html#a2ef2f573ad16ce321fdcc0fd5542884c">   55</a></span>&#160;    <span class="keyword">const</span> <a class="code" href="class_t_p1_1_1_porte.html">Porte</a>&amp; <a class="code" href="class_t_p1_1_1_porte.html#a2ef2f573ad16ce321fdcc0fd5542884c">Porte::operator =</a>(<span class="keyword">const</span> <a class="code" href="class_t_p1_1_1_porte.html">Porte</a>&amp; source)</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    {</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;        <span class="keywordflow">if</span>(&amp;source != <span class="keyword">this</span>)</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;        {</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;            <a class="code" href="class_t_p1_1_1_porte.html#a1907533e4de27e978b37f8db635e9159">color</a> = source.<a class="code" href="class_t_p1_1_1_porte.html#a1907533e4de27e978b37f8db635e9159">color</a>;</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;            <a class="code" href="class_t_p1_1_1_porte.html#afbcaef670fe7cf89c8af9e1347df4e23">destination</a> = source.<a class="code" href="class_t_p1_1_1_porte.html#afbcaef670fe7cf89c8af9e1347df4e23">destination</a>;</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;        }</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;        <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;    }</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;</div>
<div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="class_t_p1_1_1_porte.html#ae4ee7c63216e6e72d0a6364523ae70d5">   70</a></span>&#160;    <a class="code" href="namespace_t_p1.html#a8b5ef3e0301394a6503b5b11ab59690e">Couleur</a> <a class="code" href="class_t_p1_1_1_porte.html#ae4ee7c63216e6e72d0a6364523ae70d5">Porte::getCouleur</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;<span class="keyword">    </span>{</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="class_t_p1_1_1_porte.html#a1907533e4de27e978b37f8db635e9159">color</a>;</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;    }</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;</div>
<div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="class_t_p1_1_1_porte.html#a89b049715752847eb6f9a0365531c8db">   80</a></span>&#160;    <a class="code" href="class_t_p1_1_1_piece.html">Piece</a>&amp; <a class="code" href="class_t_p1_1_1_porte.html#a89b049715752847eb6f9a0365531c8db">Porte::getDestination</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;<span class="keyword">    </span>{</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;        <span class="keywordflow">return</span> *<a class="code" href="class_t_p1_1_1_porte.html#afbcaef670fe7cf89c8af9e1347df4e23">destination</a>;</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    }</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;</div>
<div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="class_t_p1_1_1_porte.html#ab2e21c1b8874c58b8388f4167d70a5e0">   92</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_t_p1_1_1_porte.html#ab2e21c1b8874c58b8388f4167d70a5e0">Porte::operator ==</a>(<span class="keyword">const</span> <a class="code" href="class_t_p1_1_1_porte.html">Porte</a>&amp; p)</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    {</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;        <span class="keywordflow">if</span>(<a class="code" href="class_t_p1_1_1_porte.html#a1907533e4de27e978b37f8db635e9159">color</a>==p.<a class="code" href="class_t_p1_1_1_porte.html#a1907533e4de27e978b37f8db635e9159">color</a> &amp;&amp; <a class="code" href="class_t_p1_1_1_porte.html#afbcaef670fe7cf89c8af9e1347df4e23">destination</a> == p.<a class="code" href="class_t_p1_1_1_porte.html#afbcaef670fe7cf89c8af9e1347df4e23">destination</a>)</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;        {</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;            <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;        }</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;        <span class="keywordflow">else</span></div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;        {</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;            <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;        }</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    }</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;} <span class="comment">// namespace TP1</span></div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;</div>
<div class="ttc" id="class_t_p1_1_1_porte_html_a2ef2f573ad16ce321fdcc0fd5542884c"><div class="ttname"><a href="class_t_p1_1_1_porte.html#a2ef2f573ad16ce321fdcc0fd5542884c">TP1::Porte::operator=</a></div><div class="ttdeci">const Porte &amp; operator=(const Porte &amp;source)</div><div class="ttdoc">surcharge de l&#39;opérateur d&#39;égalité, permet d&#39;assigner les données membre d&#39;une porte à l&#39;objet couran...</div><div class="ttdef"><b>Definition:</b> <a href="_porte_8cpp_source.html#l00055">Porte.cpp:55</a></div></div>
<div class="ttc" id="class_t_p1_1_1_porte_html_ae4ee7c63216e6e72d0a6364523ae70d5"><div class="ttname"><a href="class_t_p1_1_1_porte.html#ae4ee7c63216e6e72d0a6364523ae70d5">TP1::Porte::getCouleur</a></div><div class="ttdeci">Couleur getCouleur() const </div><div class="ttdoc">permet de récupérer la couleur de la porte </div><div class="ttdef"><b>Definition:</b> <a href="_porte_8cpp_source.html#l00070">Porte.cpp:70</a></div></div>
<div class="ttc" id="_porte_8h_html"><div class="ttname"><a href="_porte_8h.html">Porte.h</a></div><div class="ttdoc">Ce fichier contient l&#39;interface d&#39;une porte. </div></div>
<div class="ttc" id="namespace_t_p1_html_a8b5ef3e0301394a6503b5b11ab59690e"><div class="ttname"><a href="namespace_t_p1.html#a8b5ef3e0301394a6503b5b11ab59690e">TP1::Couleur</a></div><div class="ttdeci">Couleur</div><div class="ttdoc">Énumération des couleurs possibles pour une porte. </div><div class="ttdef"><b>Definition:</b> <a href="_porte_8h_source.html#l00023">Porte.h:23</a></div></div>
<div class="ttc" id="class_t_p1_1_1_porte_html_ab2e21c1b8874c58b8388f4167d70a5e0"><div class="ttname"><a href="class_t_p1_1_1_porte.html#ab2e21c1b8874c58b8388f4167d70a5e0">TP1::Porte::operator==</a></div><div class="ttdeci">bool operator==(const Porte &amp;p)</div><div class="ttdoc">surcharge de l&#39;opérateur. </div><div class="ttdef"><b>Definition:</b> <a href="_porte_8cpp_source.html#l00092">Porte.cpp:92</a></div></div>
<div class="ttc" id="class_t_p1_1_1_porte_html"><div class="ttname"><a href="class_t_p1_1_1_porte.html">TP1::Porte</a></div><div class="ttdoc">classe représentant une porte colorée dans un labyrinthe. </div><div class="ttdef"><b>Definition:</b> <a href="_porte_8h_source.html#l00036">Porte.h:36</a></div></div>
<div class="ttc" id="class_t_p1_1_1_piece_html"><div class="ttname"><a href="class_t_p1_1_1_piece.html">TP1::Piece</a></div><div class="ttdoc">Piece dans un labyrinthe ayant un nom unique et une liste de portes qui partent de cette pièce...</div><div class="ttdef"><b>Definition:</b> <a href="_piece_8h_source.html#l00028">Piece.h:28</a></div></div>
<div class="ttc" id="class_t_p1_1_1_porte_html_a1907533e4de27e978b37f8db635e9159"><div class="ttname"><a href="class_t_p1_1_1_porte.html#a1907533e4de27e978b37f8db635e9159">TP1::Porte::color</a></div><div class="ttdeci">Couleur color</div><div class="ttdef"><b>Definition:</b> <a href="_porte_8h_source.html#l00094">Porte.h:94</a></div></div>
<div class="ttc" id="class_t_p1_1_1_porte_html_afbcaef670fe7cf89c8af9e1347df4e23"><div class="ttname"><a href="class_t_p1_1_1_porte.html#afbcaef670fe7cf89c8af9e1347df4e23">TP1::Porte::destination</a></div><div class="ttdeci">Piece * destination</div><div class="ttdef"><b>Definition:</b> <a href="_porte_8h_source.html#l00096">Porte.h:96</a></div></div>
<div class="ttc" id="namespace_t_p1_html_a8b5ef3e0301394a6503b5b11ab59690eae0bf5933ca3585058577def6ab4ceec7"><div class="ttname"><a href="namespace_t_p1.html#a8b5ef3e0301394a6503b5b11ab59690eae0bf5933ca3585058577def6ab4ceec7">TP1::Aucun</a></div><div class="ttdef"><b>Definition:</b> <a href="_porte_8h_source.html#l00025">Porte.h:25</a></div></div>
<div class="ttc" id="class_t_p1_1_1_porte_html_aaa1c4811df774b15a10037b57872523c"><div class="ttname"><a href="class_t_p1_1_1_porte.html#aaa1c4811df774b15a10037b57872523c">TP1::Porte::Porte</a></div><div class="ttdeci">Porte()</div><div class="ttdoc">constructeur par défaut </div><div class="ttdef"><b>Definition:</b> <a href="_porte_8cpp_source.html#l00027">Porte.cpp:27</a></div></div>
<div class="ttc" id="class_t_p1_1_1_porte_html_a9a13199023bb030e7939966f3d4fb6cc"><div class="ttname"><a href="class_t_p1_1_1_porte.html#a9a13199023bb030e7939966f3d4fb6cc">TP1::Porte::~Porte</a></div><div class="ttdeci">virtual ~Porte()</div><div class="ttdoc">destructeur de la classe </div><div class="ttdef"><b>Definition:</b> <a href="_porte_8cpp_source.html#l00034">Porte.cpp:34</a></div></div>
<div class="ttc" id="class_t_p1_1_1_porte_html_a89b049715752847eb6f9a0365531c8db"><div class="ttname"><a href="class_t_p1_1_1_porte.html#a89b049715752847eb6f9a0365531c8db">TP1::Porte::getDestination</a></div><div class="ttdeci">Piece &amp; getDestination() const </div><div class="ttdoc">permet de récupérer la pièce vers laquel la porte mène </div><div class="ttdef"><b>Definition:</b> <a href="_porte_8cpp_source.html#l00080">Porte.cpp:80</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="_porte_8cpp.html">Porte.cpp</a></li>
    <li class="footer">Généré le Dimanche 8 Juin 2014 19:37:05 pour TP1-Algo par
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
  </ul>
</div>
</body>
</html>
